#ifndef LOOPLIST_H
#define LOOPLIST_H

#include <stdio.h>
#include <string>
#include <vector>
#include <stdint.h>
#include "kcppacket.h"

using namespace std;
class LoopList {
public:
	LoopList(uint32_t n);

	void AddPacket(shared_ptr<KCPPacket> pack, uint32_t index);

	shared_ptr<KCPPacket> TakePacket();

	void MoveStart();

private:
	uint32_t start = 0;
	uint32_t readPos = 0;
	std::vector<shared_ptr<KCPPacket> > recvSlots;
	uint32_t total;


};

#endif